export let FORM = {
  name: '表单',
  list: [
    {
      name: '验证',
      event: 'validateForm',
      explain: '触发表单组件的验证动作，当选择的表单组件全部验证通过才会执行下一个动作，否则不执行下一个动作。传递数据为空。',
      extension: {
        formSelect: {
          type: 'exTreeSelect',
          name: '表单选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageFormModules',
          filter: 'uiForm',
        },
      },
    },
    {
      name: '获取表单值',
      event: 'getFormData',
      explain:
        '获取表单组件的 formData ，选中多个表单组件时会将多个表单组件的值进行合并，若有相同 key 则后面组件的值会覆盖前面组件的值。传递数据为组合后的数据对象。',
      extension: {
        formSelect: {
          type: 'exTreeSelect',
          name: '表单选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageFormModules',
          filter: ['uiForm', 'uiCardList', 'uiLcsSystemIndexPage'],
        },
        getOldValueKey: {
          name: '获取老值',
          type: 'exInput',
          value: '',
          tooltip: '获取到的老值会在字段 key 前加上 ‘old_’ 前缀；多个 key 用 ‘,’ 分隔。',
        },
        getDataKey: {
          name: '获取数据Key',
          type: 'exInput',
          value: '',
          tooltip: '通过 key 筛选数据；多个 key 用 ‘,’ 分隔。',
        },
      },
    },
    {
      name: '重置表单',
      event: 'formReset',
      explain: '将表单组件的 formData 重置为上一次的状态（数据源绑定之后获取到的值或数据注入的值）。无传递数据。',
      extension: {
        formSelect: {
          type: 'exTreeSelect',
          name: '表单选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageFormModules',
          filter: 'uiForm',
        },
      },
    },
    {
      name: '清空表单',
      event: 'formClear',
      explain: '将表单组件的 formData 清空，有设置默认值的表单项会赋值为默认值。无传递数据。',
      extension: {
        formSelect: {
          type: 'exTreeSelect',
          name: '表单选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageFormModules',
          filter: 'uiForm',
        },
      },
    },
    {
      name: ' 清空表单项',
      event: 'formItemReset',
      explain: '将所选表单项组件的值清空（若有配置默认值则会赋值为默认值），表单项组件所属的表单组件的 formData 也会做相应改变。无传递数据',
      extension: {
        formItemSelect: {
          type: 'exTreeSelect',
          name: '表单项选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageModules',
          filter: 'FORM_ITEMS',
        },
        notUseDefaultVal: {
          type: 'exSwitch',
          name: '彻底清空',
          value: false,
        },
      },
    },
    {
      name: '开启验证',
      event: 'openFormItemRule',
      explain: '将表单项组件的验证开启。无传递数据。',
      extension: {
        moduleId: {
          type: 'exTreeSelect',
          name: '组件选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageModules',
          filter: 'FORM_ITEMS',
        },
      },
    },
    {
      name: '关闭验证',
      event: 'closeFormItemRule',
      explain: '将表单项组件的验证关闭。无传递数据。',
      extension: {
        moduleId: {
          type: 'exTreeSelect',
          name: '组件选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageModules',
          filter: 'FORM_ITEMS',
        },
      },
    },
    {
      name: '运行逻辑条件',
      event: 'runFormLogicConditon',
      explain: '触发表单组件配置的逻辑条件，条件不满足的值将被置为空。传递数据为空。',
      extension: {
        formSelect: {
          type: 'exTreeSelect',
          name: '表单选择',
          value: [],
          hasCheckbox: true,
          treeData: '$getPageFormModules',
          filter: 'uiForm',
        },
      },
    },
    // {
    //   name: '提交表单',
    //   event: 'submitForm',
    //   extension: {
    //     submitForm: {
    //       type: 'exSubmitForm',
    //       name: '表单选择',
    //       value: [],
    //       hasCheckbox: false,
    //       treeData: '$getPageFormModules',
    //     },
    //   },
    // },
  ],
}
